﻿Imports Microsoft.Xna.Framework
Imports Runa.Foundation.Runtime

Namespace Runtime

    Public Class GameTimeEventArgs

        Public Property ElapsedGameTime() As New TimeSpan
        Public Property IsRunningSlowly() As Boolean
        Public Property TotalGameTime() As New TimeSpan

        Public Sub New()
            MyBase.New()
        End Sub

        Public Sub New(ByVal g As GameTime)
            Me.ElapsedGameTime = g.ElapsedGameTime
            Me.IsRunningSlowly = g.IsRunningSlowly
            Me.TotalGameTime = g.TotalGameTime
        End Sub

#If WINDOWS_PHONE Then

        Public Sub New(ByVal g As GameTimerEventArgs)
            Me.ElapsedGameTime = g.ElapsedTime
            Me.IsRunningSlowly = False
            Me.TotalGameTime = g.TotalTime
        End Sub

#End If

        Public Function ToGameTime() As GameTime
            Return New GameTime(Me.TotalGameTime, Me.ElapsedGameTime, Me.IsRunningSlowly)
        End Function

#If WINDOWS_PHONE Then

        Public Function ToGameTimerEventArgs() As GameTimerEventArgs
            Return New GameTimerEventArgs(Me.TotalGameTime, Me.ElapsedGameTime)
        End Function

#End If

    End Class

End Namespace